<%@ page import="com.imist.Message" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: imist
  Date: 2018/8/13
  Time: 下午9:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%
   String title = request.getParameter("title");
   String content = request.getParameter("content");
    Message message = new Message();
    message.setTittle(title);
    message.setContent(content);
    List<Message> messages = (List<Message>) session.getAttribute("messages");
    if (messages == null){
        messages = new ArrayList<>();
        session.setAttribute("messages",messages);
    }
    messages.add(message);
    response.sendRedirect(request.getContextPath()+"/message.jsp?subFlag=1");
%>
<html>
<head>
    <title>messageSub</title>
</head>
<body>

</body>
</html>
